package MyCfg

import (
	"context"
	"github.com/gogf/gf/v2/frame/g"
)

func GetSiteConfig[T comparable](ctx context.Context, name string) T {
	v, err := g.Cfg().Get(ctx, "site."+name)
	res := new(T)
	if err != nil {
		return *res
	}
	*res = v.Interface().(T)
	return *res
}
